<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="theme-color">
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>分享家</title>
    <link rel="stylesheet" type="text/css" href="../lib/css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../lib/css/mui.css"/>
    <link rel="stylesheet" href="../css/util.css">
    <script src="http://at.alicdn.com/t/font_371407_7omis3wrfr7tx1or.js"></script>
</head>
<link rel="stylesheet" href="../css/indent_detail.css">
<body>
<header class="fxj-header">
    <back></back>
    <h1 class="fxj-title">订单详情</h1>
</header>

<main id="main">
    <div class="indent-status">
        <svg class="icon highlight">
            <use v-show="smile" xlink:href="#icon-smile"></use>
            <use v-show="!smile" xlink:href="#icon-bukaixin"></use>
        </svg>
        <div>
            <span class="highlight" v-cloak>{{info.status.value}}</span>
            <span class="small" v-if="info.status.status===1" v-cloak>等待接受订单</span>
            <span class="small" v-if="info.status.status===2" v-cloak>已接受订单，等待房客付款</span>
            <span class="small" v-if="info.status.status===3" v-cloak>房客已付款，请提前与房客联系准备入住事宜。</span>
            <span class="small" v-if="info.status.status===4" v-cloak>订单正在进行中</span>
            <span class="small" v-if="info.status.status===0" v-cloak>抱歉，订单已经失效。</span>
        </div>
    </div>

    <div class="house-res">
        <div class="title" @click="goHouseResDetail(info.house_id)" v-cloak>
            {{info.title}}
        </div>
        <div class="house-guys" @click="goHouseResDetail(info.house_id)">
            <img :src="fxj.fixImgUrl(info.img)" v-cloak>
            <div class="house-des">
                <div v-cloak>{{new Date(Number(info.start_date+'000')).toLocaleDateString().replace(/\//g,'.')}}-{{new
                    Date(Number(info.end_date+'000')).toLocaleDateString().replace(/\//g,'.')}} 共{{info.day_total}}晚
                </div>
                <div v-cloak>预定类型：{{info.lease_type.value}}</div>
                <div v-cloak>入住人数：{{info.guest_count}}人</div>
            </div>
        </div>
        <div class="line">
            <span v-cloak>房客姓名：{{info.tenant_nickname}}</span>
            <span class="highlight" @click="chatting(info.landlord_id)">
                <svg class="icon">
                    <use xlink:href="#icon-liaotian1"></use>
                </svg>
                在线联系
            </span>
        </div>
        <div class="line">
            <a style="color: black" :href="'tel:'+info.landlord_phone" v-cloak>房客手机：{{info.tenant_phone}}</a>
            <span class="highlight" @click="call(info.landlord_phone)">
                <svg class="icon">
                    <use xlink:href="#icon-shouji"></use>
                </svg>
                拨打电话
            </span>
        </div>
        <!--<div class="line">
            <span class="address" v-cloak>入住地址：地址地址地址地址地址地址地址地址地址</span>
            <svg class="icon highlight">
                <use xlink:href="#icon-location-c-o"></use>
            </svg>
        </div>-->
    </div>

    <div class="price-detail">
        <div class="line">
            <span>订单总收入</span>
            <span class="highlight" v-cloak>￥{{info.rent_price}}</span>
        </div>
        <div class="line" v-if="info.status.status>=5">
            <span>实际收入</span>
            <span class="highlight" v-cloak>￥{{Number(info.rent_price)*0.9}}</span>
        </div>
        <div class="line">
            <span>在线收取押金</span>
            <span class="highlight" v-cloak>￥{{info.deposit}}</span>
        </div>
        <p v-cloak>押金由分享家誓为保管，订单完成后若房东没有提出扣押要求将根据支付方式原路返回。</p>
    </div>

    <div v-cloak class="line handle cancel" v-if="info.status.status===1"><span class="span_two">接受订单</span>|<span class="span_two">拒绝订单</span></div>

    <div v-cloak class="line handle highlight" v-if="info.status.status===2||info.status.status===3||info.status.status===4">联系房客</div>

    <div v-cloak class="line handle cancel" v-if="info.status.status===5"><span class="span_two">操作押金</span>|<span class="span_two">立即点评</span></div>

    <div v-cloak class="line handle cancel" v-if="info.status.status===6"><span class="span_two">立即点评</span>|<span class="span_two">查看点评</span></div>

    <div v-cloak class="line handle cancel" v-if="info.status.status===7"><span class="span_two">操作押金</span>|<span class="span_two">立即点评</span></div>

    <div v-cloak class="line handle cancel" v-if="info.status.status===6"><span class="span_two">删除订单</span>|<span class="span_two">>查看点评</span></div>


    <div v-cloak class="line handle cancel" v-if="info.status.status===0" @click="delete_order">删除订单</div>



    <div class="line" @click="toggleGuysShow">
        <span>入住人</span>
        <span class="highlight" v-cloak>
            共{{info.guest_count}}位
            <svg class="icon">
                <use xlink:href="#icon-you"></use>
            </svg>
        </span>
    </div>
    <div v-show="showGuysDetail">
        <div class="line" v-for="guy of info.resident">
            <span>{{guy.name}}</span>
            <span>{{guy.nation_name}}</span>
            <span>{{guy.is_verified==='0'?'身份未认证':'身份已认证'}}</span>
        </div>
    </div>

    <div class="reservation">

        <div v-cloak>下单时间：{{new Date(Number(info.date+'000')).toLocaleString()}}</div>
        <div v-cloak>订单编号：{{info.oid}}</div>
    </div>
</main>

<script type="text/javascript" src="../lib/js/babel-polyfill.js"></script>
<script type="text/javascript" src="../lib/js/vue.js"></script>
<script type="text/javascript" src="../lib/js/mui.js"></script>
<script type="text/javascript" src="../lib/js/jquery.js"></script>
<script type="text/javascript" src="../script/util.js"></script>

<script src="../script/indent_detail_landlord.js"></script>
</body>
</html>